home *** CD-ROM | disk | FTP | other *** search
/ Shareware Overload Trio 2 / Shareware Overload Trio Volume 2 (Chestnut CD-ROM).ISO / dir35 / 2xcopy.zip / HELP.TXT < prev    next >
Text File  |  1994-05-07  |  6KB  |  141 lines

  1.                              ╓────────────┐
  2.                              ║  HELP.TXT  │
  3.                              ╚════════════╛
  4.  
  5.                        Sat  05-07-1994  12:32:21
  6.  
  7.      This batch file set contains the files:
  8.  
  9.           1.   A.BAT
  10.           2.   B.BAT
  11.           3.   EDIT2.EXE
  12.           4.   HELP.TXT
  13.           5.   HELP2.BAT
  14.           6.   READ.COM
  15.           7.   START.BAT
  16.           8.   STEP.BAT
  17.  
  18.      ┌─────────┐
  19.      │START.BAT│
  20.      └─────────┘
  21.      Should allow you to install files on a floppy to -any- directory on
  22.      -any- drive. Admittedly you have to modify the batch file to tell
  23.      START.BAT what directory and drive you want, but that's about it.
  24.  
  25.      ┌─────────┐
  26.      │XCOPY.EXE│
  27.      └─────────┘
  28.      The DOS file XCOPY.EXE is used to copy the files so that MS-DOS
  29.      file -must- be in your PATH for this to work. XCOPY.EXE normally
  30.      displays the files that it "reads" to the screen, but I redirected
  31.      this output to a new file called FILE(S).TXT. The contents of
  32.      FILE(S).TXT is displayed at the end of the batch file to tell you
  33.      what files were copied from the floppy.
  34.  
  35.      ┌─────────────┐
  36.      │IF ERRORLEVEL│
  37.      └─────────────┘
  38.      XCOPY.EXE runs and if successful returns an Exit Code of zero (0).
  39.      We check for that Exit Code and report it using the batch file
  40.      command "IF ERRORLEVEL" as part of START.BAT. If you want to copy
  41.      from one floppy in one drive to a floppy in another drive which is
  42.      Write-Protected, the Exit Code will pick that up and tell you that
  43.      you made an error and to try again. Not too bad for a batch file,
  44.      eh?
  45.  
  46.      If you are unfamilar with the coding of IF ERRORLEVEL, don't feel
  47.      too simple. This batch command has tripped up many a professional
  48.      programmer.... including the editor and staff of the magazine
  49.      "Inside Microsoft BASIC."
  50.  
  51.      ┌─────────┐
  52.      │HELP2.BAT│
  53.      └─────────┘
  54.      The batch file HELP2.BAT, runs START.BAT to display this help file
  55.      HELP.TXT. You can make HELP.TXT your very own by changing the text
  56.      in it. HELP2.BAT is very simple. What it does is pass two (2)
  57.      variables to START.BAT. Any second (2nd) variable letter or number
  58.      then tells START.BAT to GOTO the LABEL ":HelpText."
  59.  
  60.      At that LABEL, HELP.TXT is loaded by my ASCII file loader READ.COM.
  61.      You read HELP.TXT then exit the file by pressing {Esc}. The next
  62.      command begins START.BAT but this time with -no- variables on the
  63.      command line.
  64.  
  65.      START.BAT then runs, display instructions on what to type into the
  66.      edit box. The edit box is displayed by EDIT2.EXE, a little program
  67.      I wrote that allows you to enter commands -inside- a batch file!
  68.  
  69.      EDIT2.EXE waits for you to type a letter "A" or "B" to designate
  70.      what drive you have the floppy in, stuffs that letter into the
  71.      keyboard buffer and -restarts- START.BAT with that letter as the
  72.      first (1st) variable.
  73.  
  74.      So you will understand what a "variable" is, the following is a
  75.      representation of the command inside of HELP2.BAT:
  76.  
  77.      START          c                   b
  78.                                       
  79.      batch file   1st variable        2nd variable
  80.  
  81.  
  82.      ┌───────────────┐
  83.      │A.BAT and B.BAT│
  84.      └───────────────┘
  85.  
  86.      These two (2) batch files are absolutely necessary. They are the
  87.      ones that run after you type the "A" or "B" inside START.BAT. All
  88.      they do is -restart- START.BAT with a first (1st) variable of
  89.      either "A" or "B." Now START.BAT "sees" either an "A" or a "B" and
  90.      goes to that LABEL, "tells" MS-DOS what floppy drive the files are
  91.      in and runs the rest of the program.
  92.  
  93.      Having watched computer novices type commands on the command line
  94.      now for Oh... a long time, I can tell you that the simplier the
  95.      typing is for this Windows generation, the better. If you don't
  96.      believe me, you can modify the instructions in START.BAT to say:
  97.  
  98.      "TYPE: START A -or- START B to continue..."
  99.      "PRESS: {Enter}"
  100.  
  101.      Betcha more than a few mess it up. I have seen them put quotes
  102.      around the command, forget the space between the two words,...
  103.      forget to press {Enter}, et cetera, et cetera, et cetera.... But
  104.      that command does away with the two batch files A.BAT and B.BAT.
  105.  
  106.      If you don't think this is all necessary, try copying all the files
  107.      from a floppy to a directory on a hard drive from a batch file,
  108.      checking for IF ERRORLEVEL, making a new text file called
  109.      FILE(S).TEXT, etc...  without telling MS-DOS carefully and
  110.      specifically -where- the files are and -what- the files are to be
  111.      copied. START.BAT does all that.
  112.  
  113.      ┌────────┐
  114.      │STEP.BAT│
  115.      └────────┘
  116.      I included STEP.BAT with this file set, not because it is necessary
  117.      to run START.BAT or any of the other files but because it is a
  118.      "debugger" for batch files.
  119.  
  120.      If you type:
  121.  
  122.      STEP HELP
  123.  
  124.      you will be able to follow -step by step- (command by command) how
  125.      each command in all the batch files used works! I included STEP.BAT
  126.      for those few of you who want to see what's really happening when
  127.      you run these otherwise invisible batch files.
  128.  
  129.                  ┌──────────────────────────────────────┐
  130.                  │  IF YOU MAKE THIS BETTER... TELL ME! │
  131.                  └──────────────────────────────────────┘
  132.  
  133.       Please let me know if you make this file set better. I am using
  134.      this file set to set up diskettes to be used by -anyone- to install
  135.      files on any computer.
  136.  
  137.      START.BAT has to work for "anyone" because that's who use most of
  138.      the computers now-a-days....
  139.  
  140.      John De Palma on CompuServe 76076,571
  141.